<template>
  <div class="applyForm">
    <header-com title="报名" moduleName="match"></header-com>
    <!-- <singleHome></singleHome> -->
    <singleHome v-if="apply_form_type == 1"></singleHome>
    <doubleHome v-if="apply_form_type == 2"></doubleHome>
    <teamHome v-if="apply_form_type == 3"></teamHome>
  </div>
</template>

<script>
  import {mapState} from 'vuex'
  import singleHome from  './components/singleHome'
  import teamHome from './components/teamHome'
  import doubleHome from "./components/doubleHome";
  export default {
    name: "applyForm",
    components:{
      singleHome,
      teamHome,
      doubleHome
    },
		data() {
			return {
				apply_form_type: ''
			}
		},
    computed:{
//       ...mapState({
//         apply_form_type:'apply_form_type'
//       })
    },
		created() {
			console.log(this.$route.query.projectType)
			if(this.$route.query.projectType == '男单' || this.$route.query.projectType == '女单' || this.$route.query.projectType == '单打'){
				this.apply_form_type = 1
			}
			if(this.$route.query.projectType == '男双' || this.$route.query.projectType == '女双' || this.$route.query.projectType == '混双' || this.$route.query.projectType == '双打'){
				this.apply_form_type = 2
			}
			if(this.$route.query.projectType == '男团' || this.$route.query.projectType == '女团' || this.$route.query.projectType == '混团'){
				this.apply_form_type = 3
			}
			// if(this.$route.query.projectType == '单打'){
			// 	this.apply_form_type = 4
			// }
			// if(this.$route.query.projectType == '双打'){
			// 	this.apply_form_type = 5
			// }
		},
  }
</script>

<style scoped>

</style>
